<template>
<div class="quill">
    <quill-editor
     v-model="content"
     @change="onEditorChange($event)"
     @blur="onEditorBlur($event)"
     @focus="onEditorFocus($event)">
    </quill-editor>
</div>
  
</template>

<script>

export default {
    data() {
        return {
            content:'',
        }
    },
    methods: {
        onEditorChange(){   //值发生改变
            console.log(this.content);
        },
        onEditorBlur(){   //失去焦点时
            console.log('b');
            this.$emit('childByValue', this.content)
        },
        onEditorFocus(){    //获取焦点
            this.$emit('childByValue', this.content)
        }
    },
    

}
</script>

<style>
.quill{
    font-size: 0.2rem;
    height: 2rem;
    width: 6rem;
}
</style>